package com.zh.common.entity;


import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;


import java.io.Serializable;

/**
 * code is far away from bug with the animal protecting
 * ┏┓　　　┏┓
 * ┏┛┻━━━┛┻┓
 * ┃　　　　　　　┃
 * ┃　　　━　　　┃
 * ┃　┳┛　┗┳　┃
 * ┃　　　　　　　┃
 * ┃　　　┻　　　┃
 * ┃　　　　　　　┃
 * ┗━┓　　　┏━┛
 * 　　┃　　　┃神兽保佑
 * 　　┃　　　┃代码无BUG！
 * 　　┃　　　┗━━━┓
 * 　　┃　　　　　　　┣┓
 * 　　┃　　　　　　　┏┛
 * 　　┗┓┓┏━┳┓┏┛
 * 　　　┃┫┫　┃┫┫
 * 　　　┗┻┛　┗┻┛
 *
 * @Description: 返回结果实体类
 * @Author: Li.HuiNeng
 * @Create in: 2019/8/13
 * @Version: 1.0.1
 */
@ApiModel(description = "返回结果实体类")
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Result  implements Serializable {

    private static final long serialVersionUID = 6224665191174609356L;

    @ApiModelProperty(value = "是否成功", name = "success", example = "true")
    private Boolean success;

    @ApiModelProperty(value = "返回信息描述", name = "message", example = "响应成功!")
    private String message;

    @ApiModelProperty(value = "返回状态码", name = "status", example = "200")
    private Integer code;

    @ApiModelProperty(value = "请求时间", name = "time")
    private String time;

    public Result() { }
    public Result(boolean success, String message, int code) {
        this.success = success;
        this.message = message;
        this.code = code;
    }
}
